﻿namespace Chaliy.Syndication.UnitTests.MediaRss
{
    using Chaliy.Syndication.MediaRss;
    using Xunit;
    using System;

    public class When_Write_Media_Content_With_Thumbnail
    {
        private const string FakeContentUrl = "http://example.com/media.jpeg";

        [Fact]
        public void Serializer_Should_Write_Child_Thumbnail_Element()
        {
            MediaContent content 
                = new MediaContent
                {
                    new MediaThumbnail{ Url = new Uri(FakeContentUrl) }                    
                };

            content.ShouldMatchMedia("/media:content/media:thumbnail",
                "Content SHOULD have child thumbnail element");
        }
    }
}
